const db = require("./db");

// Promise封装提取
let fn = function (mysql, data) {
    return new Promise((resolve, reject) => {
        db(mysql, data, (err, data) => {
            err ? reject(err) : resolve(data);
        })
    })
}

module.exports = fn;